<p:dialog xmlns="http://www.w3.org/1999/xhtml"
      	  xmlns:h="http://java.sun.com/jsf/html"
      	  xmlns:f="http://java.sun.com/jsf/core"
      	  xmlns:ui="http://java.sun.com/jsf/facelets"
      	  xmlns:p="http://primefaces.org/ui"
      	  modal="true"  resizable="true" width="40%"
		  widgetVar="dialogConsultarCondicaoPagamento" id="idDialogConsultarCondicaoPagamento" closable="true"
		  appendTo="@(body)" header="Consultar Condições de Pagamento"> 	
  	
	 <link rel="stylesheet" type="text/css" href="./estilos.css"/>  
<h:form id="formDialogConsultarCondicaoPagamento" prependId="false">
<h:panelGroup id="pgDialogConsultarCondicaoPagamento">

 	<p:messages id="messagesMatriculaCondPgto" autoUpdate="true" closable="true" /> 
    	<h:panelGrid columns="3" style="margin-right:10%;">  
            <h:outputLabel value="Código" styleClass="outputLabel"/>  
            <h:outputLabel value="CondicaoPagamento" styleClass="outputLabel"/>
            <h:outputLabel />              
            <p:inputText value="#{matriculaBean.condicaoPagamento.idCondicaoPagamento}" styleClass="inputId">
            	<p:ajax listener="#{matriculaBean.ajaxGet}" />
            </p:inputText>   
  			<p:inputText value="#{matriculaBean.condicaoPagamento.descricao}" styleClass="inputDescricao">
  				<p:ajax listener="#{matriculaBean.ajaxGet}" />
            </p:inputText>  
  			<p:commandButton value="Consultar" actionListener="#{matriculaBean.findCondicaoPagamento}" 
  								update="dataTableCondicaoPagamento" process="@this" styleClass="commandButton" /> 
        </h:panelGrid>  
        		
    <p:dataTable id="dataTableCondicaoPagamento" var="condicaoPagamento" value="#{matriculaBean.dmCondicaoPagamento}"  
    			 rowKey="#{condicaoPagamento.idCondicaoPagamento}" paginator="true" rows="10" selectionMode="single" style="padding-top:20px;">   
		<p:column style="width:4%; text-align:center">  
            <f:facet name="header">  
                <h:outputText value="Código" />  
            </f:facet>  
            <h:outputText value="#{condicaoPagamento.idCondicaoPagamento}" />  
        </p:column>  
  
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Descrição" />  
            </f:facet>  
            <h:outputText value="#{condicaoPagamento.descricao}" />  
        </p:column>  
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Forma de Pagamento" />  
            </f:facet>  
            <h:outputText value="#{condicaoPagamento.formaPagamento.descricao}" />  
        </p:column> 
        
        <p:column style="width:4%; text-align:center">  
        	<f:facet name="header">
        	 <h:outputText value="Adicionar" />
        	</f:facet>
         	<p:commandButton id="selectButtonEditar" actionListener="#{matriculaBean.selectCondicaoPagamento}" process="@this"  icon="ui-icon-circle-plus" title="Add" />
        </p:column> 
    </p:dataTable> 

 </h:panelGroup>
 </h:form>
</p:dialog>
